package com.inventory.spring.controller.security;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class LoginController {
	
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public String home() {
		return "redirect:/login.do";
	}
	
	@RequestMapping(value = "/login.do", method = RequestMethod.GET)
	public String redirectToLogin() {
		return "loginMain";
	}
	
	@RequestMapping(value = "/protected/home.do", method = RequestMethod.GET)
	public String loginSuccess() {
		return "companydetails";
	}
	
	@RequestMapping(value = "/loginError.do", method = RequestMethod.GET)
	public String loginError() {
		return "companydetails";
	}
	
}
